@import "~./atlantic/zul/less/_header.less";

.z-textbox,
.z-decimalbox,
.z-intbox,
.z-longbox,
.z-doublebox {
	.fontStyle(@contentFontFamily, @baseFontSize, @baseFontWeight, @inputColor);
	min-height: @buttonHeight;
	border: 1px solid @inputBorderColor;
	margin: 0;
	padding: @paddingSmall - 1 @paddingSize - 1;
	line-height: @buttonHeight - @paddingSmall * 2;
	background: @inputBackground;

	&:focus {
		border-color: @focusBorderColor;
	}
	&[readonly] {
		border-color: @readonlyBorderColor;
		background: @readonlyBackground;
	}
	&-invalid {
		border-color: @invalidBorderColor;
		background: @invalidBackground;
	}
	&[disabled] {
		color: @inputDisabledColor !important;
		background: @inputDisabledBackground !important;
		.opacity(@disabledOpacity);
		cursor: default !important;
	}

	// Inplace editing
	&-inplace {
		border-width: 0;
		padding: @paddingSmall;
		background: none;
		resize: none;
	}
}

// error box
.z-errorbox {
	color: @errorboxColor;
	width: 260px;
	position: absolute;
	top: 0;
	left: 0;
	& > .z-errorbox-icon {
		.iconFontStyle(@baseFontSize, @errorboxColor);
		position: absolute;
		top: 8px;
		left: 8px;
		z-index: 2;
	}
}
.z-errorbox-left + .z-errorbox-icon {
	left: 16px;
}
.z-errorbox-up + .z-errorbox-icon {
	top: 16px;
}
.z-errorbox-content {
	.fontStyle(@contentFontFamily, @fontSizeMedium, @baseFontWeight, @errorboxColor);
	width: 100%;
	border: 1px solid @errorboxBorderColor;
	padding: 6px 20px 7px 26px;
	background: @errorboxBackground;
	vertical-align: middle;
	position: relative;
	overflow: hidden;
	cursor: move;
}

.z-errorbox-pointer {
	.displaySize(none, 0, 0);
	border: 6px solid transparent;
	position: absolute;
	z-index: 100;
}
// errorbox arrows: base style
.z-errorbox-left,
.z-errorbox-right,
.z-errorbox-up,
.z-errorbox-down {
	border: 6px solid transparent;
}
.z-errorbox-left {
	border-right-color: @errorboxBorderColor;
}
.z-errorbox-right {
	border-left-color: @errorboxBorderColor;
}
.z-errorbox-up {
	border-bottom-color: @errorboxBorderColor;
}
.z-errorbox-down {
	border-top-color: @errorboxBorderColor;
}
.z-errorbox-close {
	.iconFontStyle(@fontSizeXSmall, @errorboxColor);
	.size(@smallIconWidth, @smallIconHeight);
	border: 1px solid transparent;
	line-height: @smallIconWidth - 2; //minus border
	text-align: center;
	position: absolute;
	top: 4px;
	right: 4px;
	cursor: pointer;

	&:hover {
		color: @errorboxBackground;
		background: @errorboxColor;
	}
}
.z-errorbox-right ~ .z-errorbox-close {
	right: 12px;
}
.z-errorbox-up ~ .z-errorbox-close {
	top: 12px;
}

.ie8 {
	.z-textbox,
	.z-decimalbox,
	.z-intbox,
	.z-longbox,
	.z-doublebox {
		min-height: @buttonHeight - @baseHeight;
	}
}
